<?php

declare(strict_types=1);

namespace App\System\Model;

use Mine\MineModel;

/**
 * @property int $id 
 * @property string $order_no 订单号
 * @property int $order_type 订单类型
 * @property string $pay_no 第三方支付单号,余额积分支付取订单号
 * @property int $pay_type 支付方式
 * @property int $channel_id 支付通道，0为直连商户
 * @property string $amount 订单金额
 * @property string $refund_amount 退款金额
 * @property int $status 状态，0待支付，1已支付，2已退款，3已关闭
 * @property string $refund_at 退款时间
 * @property string $paid_at 支付时间
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 * @property string $expired_at 关闭时间
 * @property string $message 接口返回信息摘要
 */
class SystemPayLog extends MineModel
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'system_pay_log';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'order_no', 'order_type', 'pay_no', 'pay_type', 'channel_id', 'amount', 'refund_amount', 'status', 'refund_at', 'paid_at', 'created_at', 'updated_at', 'expired_at', 'message'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'order_type' => 'integer', 'pay_type' => 'integer', 'channel_id' => 'integer', 'amount' => 'decimal:2', 'refund_amount' => 'decimal:2', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
